function save() {
    var name = $("#name").val();
    var url =  $("#url").val();
    url = url.trim();
    var interval = $("input[type='radio']:checked").val();
    //移除display:none属性
    $("#loadingToast").removeAttr("style");
    $.post(
        "/saveStationConfig",
        {
            name: name,
            url: url,
            interval: interval
        }, function (data) {
            $("#loadingToast").attr("style", "display:none");
            showAlert(data.msg);

        }
    )
}

function edit() {
    var name = $("#name").val();
    var url =  $("#url").val();
    var id = $("#id").val();
    url = url.trim();
    var interval = $("input[type='radio']:checked").val();
    //移除display:none属性
    $("#loadingToast").removeAttr("style");
    $.post(
        "/quartz/edit",
        {
            name: name,
            url: url,
            interval: interval,
            jobGroup: $("#jobGroup").val(),
            id:id
        }, function (data) {
            $("#loadingToast").attr("style", "display:none");
            showAlert(data.msg);
        }
    )
}


function showAlert(msg) {
    $("#alert").removeAttr("style");
    $("#alertContent").text(msg);

}

function hideAlert() {
    $("#alert").attr("style", "display: none;");
}